Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Win exit code fix #421

Closed
wants to merge 14 commits into from
Closed

Win exit code fix #421

wants to merge 14 commits into from

Conversation

bjuric
Copy link
Contributor

@bjuric bjuric commented Dec 1, 2014

Moved the setting of the exit code in the windows bat template outside of the localised scope. This ensures that if the call to the java application returns an exit code greater than 0 that the script returns 1 instead of 0.

Also updated regression tests for windows bat testing to check the return code.

The changes were applied to the 0.8.0 branch.

Developed and tested on Windows 7 SP1.

mhamrah and others added 14 commits October 21, 2014 18:11
the `shift` command of cmd.exe is not shift `%*`.
and use delayed-expansion. immediate expansion cause many troubles of special-characters in arguments.
Conflicts:
	src/sbt-test/windows/java-app-archetype/build.sbt
The maintainer line is optional in the Dockerfile. While the initial commit
assumed that it was required, it appears that this is not the case. We
can therefore skip adding the line if the maintainer is not set.
Return exit code 1 in windows bat script if java application exits with
a return code greater than 0.  Update windows bat regression tests to
check the returned code.
@lightbend-cla-validator
Copy link

Hi @bjuric,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Typesafe Contributors License Agreement:

http://typesafe.com/contribute/cla

@bjuric
Copy link
Contributor Author

bjuric commented Dec 1, 2014

Accepted CLA.

@muuki88
Copy link
Contributor

muuki88 commented Dec 1, 2014

Thanks for the fix @bjuric . You branched away from 0.8.x and made a pull request on top of master, so I cannot merge this automatically.

You could

  1. make the change on top of master. Maybe git cherry-pick 6b44f17 is enough and push -f your branch.
  2. change the target to 0.8.x

You changed an existing test, but only check for returnCode == 0? A failing test would be nice to have as a regression test. So a new test with a simple main like

object Main extends App {
  sys.exit(1)
}

@bjuric
Copy link
Contributor Author

bjuric commented Dec 1, 2014

Created new pull request #423
This one targets 0.8.x branch.

@muuki88
Copy link
Contributor

muuki88 commented Dec 1, 2014

I'll close this in favor of #423

@muuki88 muuki88 closed this Dec 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants